<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ include file="taglibs.jsp"%>
<%@ include file="RolePowerManager.jsp"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
	
  <link rel="stylesheet" href="${ctx}/css/common.css" type="text/css"></link>
  <link rel="stylesheet" href="${ctx}/css/reset.css" type="text/css"></link>
  <link rel="stylesheet" href="${ctx}/css/Train/floatdiv.css" type="text/css"></link>
  <link rel="stylesheet" href="${ctx}/css/Train/TrainScoreManager.css" type="text/css"></link>
  
  <script type="text/javascript" src="${ctx}/js/jquery-1.7.2.js"></script>
  <script type="text/javascript" src="${ctx}/js/jquery.easydrag.handler.beta2.js"></script>
  <script type="text/javascript" src="${ctx}/js/Train/TrainScoreManager.js"></script>
  <script type='text/javascript' src='${ctx}/dwr/interface/TrainCourseManager.js'></script>
  <script type='text/javascript' src='${ctx}/dwr/interface/CourseScoreManager.js'></script>
   
   <script type='text/javascript' src='${ctx}/dwr/interface/GetEmpTrainManager.js'></script>

	<script type='text/javascript' src='${ctx}/dwr/engine.js'></script>
	<script type='text/javascript' src='${ctx}/dwr/util.js'></script>
	
  </head>
  <body>
  	  <div class="head">
  		<div class="curloc"><span>当前位置: 教育培训 >>培训人员及成绩</span></div>
  	  </div>
  	  <form action="FindTrainScore" method="post" id="searchform">
	  <div class="query" >
	  <div class="querytype">
	  	<label>查询条件：</label>
	  	
	  	<select class="queryselect" name="serchtype" id="serchtype" onclick="changesearchtype()">
			<option value="empname">
			员工名
			</option >
			<option value="trainname">
			培训名
			</option >
		</select>
		<input class="queryinput" type="text" name="keycode" size="12"/>
	  </div>
	  <input type="hidden"  id="searchtimeflag" name="searchtimeflag" value="0"/>
	  <div class="querytime">
	  	<div class="querybtn" onclick="search()">
	  		<span class="STYLE1"><img src="${ctx}/images/a1.gif" width="9" height="9" /></span>
            <span class="STYLE1"> </span><a style="cursor: pointer;">查询</a><span class="STYLE1"></span>
	  	</div>
      </div>  
      <div style="float: right; padding-right: 20px">
	  			<span class="STYLE1"><img src="${ctx}/images/001.gif" width="9" height="9" /></span>
            	<span class="STYLE1"> </span><a onclick="popadd()" href="#">新增</a><span class="STYLE1"></span>
	  	</div>
	  <div class="clear"> </div>
	  </div>
      </form>
        <div id="main">
        <table id="detail_t">
          <tr>
          	<th>序号</th>           
            <th>员工号</th>            
            <th>姓名</th>           
            <th>培训名称</th>                      
            <th>更多操作</th>
          </tr>
         <c:forEach items="${page.list}" var="fet" varStatus="status">
    	<tr>
    	<td>${status.count}</td>
    	<td>${fet.empno}</td>
    	<td>${fet.name}</td>   	
    	<td>${fet.trainname}</td>
    	<td>
    	<div align="center">
            <span class="STYLE1"><img src="${ctx}/images/037.gif" width="9" height="9" /></span>
            <span class="STYLE1"> [</span><a href="#" onclick="clickUpdateTrainScore('${fet.empid}','${fet.trainid }')">详情/修改</a><span class="STYLE1">]</span>
            &nbsp;&nbsp;&nbsp;
            <span class="STYLE2"><img src="${ctx}/images/010.gif" width="9" height="9" /></span>
            <span class="STYLE2"> </span><span class="STYLE1">[</span><a href="#" onclick="deleteTrainScore('${fet.empid}')">删除</a><span class="STYLE1">]</span>
            </div>
    	</td>
    </tr>
    </c:forEach>                           
        </table>
			 <div class="manu">共${page.totalCount}条记录当前第<font color="#ff6600">${page.pageNo}/${page.pageCount}</font>页
				 <a href="FindTrainScore?pageNo=${1}">首页</a>
				  <a href="FindTrainScore?pageNo=${page.pageNo-1}">上一页</a>
				  <a href="FindTrainScore?pageNo=${page.pageNo+1}">下一页</a>
				  <a href="FindTrainScore?pageNo=${page.pageCount}">末页</a> 每页显示
				  <input type="text" name="pageSize"  id="pageSize" size="4"/>条
				  <input type="submit" value="提交" class="submitbuttton" onclick="changePageSize()"/> 
			</div>
		</div>   
        
        
        <div id="UpdateTrainScore_div">
			<div id="UpdateTrainScore_head" class="div_head">
				<span class="div_title">修改/查看培训成绩详情</span> <span><a
					class="div_close" onclick="closediv()" title="close">X</a>
				</span>
			</div>
			<div id="UpdateTrainScore_box_body" >
				<div class="p_con">
				<form action="${ctx}/UpdateTrainScoreServlet" method="post" id="updatetrainScoreform">
					<table id="detail_t" width="100%">
					
					
						<tr>
   				 			<td>员工姓名：</td>
 		  		 			<td><span  id="upempname"></span></td>
 						</tr>
 						<tr>
   				 			<td>员工编号：<input type="hidden" id="empid" name="empid"/></td>
 		  		 			<td><span  id="upempno"></span></td>
 						</tr>
 						<tr>
   				 			<td>培训名称：</td>
 		  		 			<td><span  id="uptrainid"></span></td>
 						</tr>
    					<tr>
   				 			<td>培训名称：</td>
 		  		 			<td><span  id="uptrainname"></span></td>
 						</tr>
 			   			
 			   			<tr id="uptrainscore" class="upcourse">
 			   			<tr>
 			   			<tr>
 			   			<td>总成绩</td>
 			   			<td id="sumscore"></td>
 			   			</tr>
 			   			<tr>
    					<td colspan="2">
    					<span style="float: right;margin-right: 30px">
    					<input type="reset" value="重置" class="submitbuttton"/>
    					<input type="button" value="修改" onclick="UpdateTrainScore()" class="submitbuttton"/>
    					</span>
    					</td>
 				   	</tr>
       				</table>
       			</form>
				</div>
			</div>
		</div>
		<div id="AddTrainScore_div">
			<div  class="div_head" id="AddTrainScore_head">
				<span class="div_title">培训成绩添加</span> <span><a
					class="div_close" onclick="hideDiv('AddTrainScore_div');" title="close">X</a>
				</span>
			</div>
			<div  id="AddTrainScore_box_body">
				<form action="${ctx}/AddTrainScoreServlet" method="post" id="addAddTrainScoreform">
					<table id="detail_t" width="100%">
					<tr>   				
   				 		<td>员工编号：</td>
 		  		 		<td><input type="text" name="empno" id="empno" onblur="checkemp()" />
			    		<span class="error" id="emperr"></span>
			    		</td>
 					</tr>
    				<tr>   				
   				 		<td>培训编号：</td>
 		  		 		<td><input type="text" name="trainid" id="trainid" onchange="checktrainid()" /> 
 		  		 		<span style="cursor: pointer;">查看</span>
			    		<span class="error" id="trainiderr"></span>
			    		</td>
 					</tr>
 					
 			   		<tr class="addcourse" id="addcourse">
 			   		</tr>
 			   		
  				  	<tr>
    					<td colspan="2">
    					<span style="float: right;margin-right: 30px">
    					<input type="reset" value="重置" class="submitbuttton"/>
    					<input type="button" value="提交" onclick="addTrainScore()" class="submitbuttton"/>
    					</span>
    					</td>
 				   	</tr>
       				 </table>
       				 </form>
				
			</div>
		</div>
        
  </body>
</html>
